package com.chatdating.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chatdating.entity.Post;
import com.chatdating.entity.dto.AdminPostDto;
import com.github.pagehelper.PageInfo;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;


public interface PostService extends IService<Post> {

    List<Post> findById(Long id);

    List<String> uploadImages(MultipartFile[] images);

    PageInfo<AdminPostDto> AdminPostList(Integer pageNum, Integer pageSize, String uname, Integer id);

    Post getPostWithDetails(Long id);

    Page<Post> pagePosts(Page<Post> page, String keyword);

    PageInfo<AdminPostDto> delPostList(Integer pageNum, Integer pageSize, String uname, Integer id);

    void adminRemoveById(int id);

    void adminRecoverPostById(int id);

    Post getPostWithByid(Long id);

    Page<Post> getPagePostsByAuthorId(Page<Post> page, Integer authorId, String keyword);
}
